package appapi.service;


import appapi.Request.AlarmledgerReq;
import appapi.Vo.record.GetAlarmPageVo;
import appapi.dto.AlarmLedgerModel;
import appapi.dto.GetAlarmPageDto;
import appapi.entity.Zhongjiao.AlarmledgerEntity;
import appapi.entity.basic.UserInfo;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 告警台账
 *
 * @author lc
 * @version 1.0
 * @date 2023-05-12 18:19:10
 */
@Repository
public interface IAlarmledgerService {

    /**
     * 获取分页告警台账列表
     *
     * @param userInfo
     * @param alarmledgerReq 告警台账条件
     * @return
     */
    PageInfo<GetAlarmPageVo> getPage(UserInfo userInfo, GetAlarmPageDto alarmledgerReq);

    /**
     * 获取告警台账列表
     *
     * @param alarmledgerReq 告警台账条件
     * @return
     */
    List<AlarmledgerEntity> list(AlarmledgerReq alarmledgerReq);

    /**
     * 获取告警台账信息
     *
     * @param alarmId       记录ID
     * @param tenantId 租户id
     * @return
     */
    AlarmledgerEntity detail(Long alarmId, Integer tenantId);

    /**
     * 返回满足告警台账条件的行数
     *
     * @param alarmledgerEntity 告警台账信息
     * @return
     */
    int count(AlarmledgerEntity alarmledgerEntity);

    /**
     * 增加告警台账
     *
     * @param alarmledgerEntity 告警台账信息
     * @return
     */
    int insert(AlarmledgerEntity alarmledgerEntity);

    /**
     * 修改告警台账
     *
     * @param alarmledgerEntity 告警台账信息
     * @return
     */
    int update(AlarmledgerEntity alarmledgerEntity);

    /**
     * 删除告警台账
     *
     * @param alarmId       记录ID
     * @param tenantId 租户id
     * @return
     */
    int delete(Long alarmId, Integer tenantId);

    List<AlarmLedgerModel> getList(GetAlarmPageDto dto);
}

